spell Datum (#1313)
authortsteven4 <13596209+tsteven4@users.noreply.github.com>
Wed, 7 Aug 2024 22:30:29 +0000 (16:30 -0600)
committerGitHub <noreply@github.com>
Wed, 7 Aug 2024 22:30:29 +0000 (16:30 -0600)
defs.h
exif.cc
garmin_txt.cc
main.cc
nmea.cc
ozi.cc
parse.cc
unicsv.cc
xcsv.cc

diff --git a/defs.h b/defs.h
index ae382c9241ec5f9fdd0bf6c0f2977155e270feb2..85465104c105d437062ca8840068bbe78e268d3d 100644 (file)
--- a/defs.h
+++ b/defs.h
@@ -116,7 +116,7 @@ constexpr double MPH_TO_MPS(double a) { return a * kMPSPerMPH;}
 constexpr double KNOTS_TO_MPS(double a)  {return a * kMPSPerKnot;}
 
 constexpr int kDatumOSGB36 = 86; // GPS_Lookup_Datum_Index("OSGB36")
-constexpr int kDautmWGS84 = 118; // GPS_Lookup_Datum_Index("WGS 84")
+constexpr int kDatumWGS84 = 118; // GPS_Lookup_Datum_Index("WGS 84")
 
 
 /*
diff --git a/exif.cc b/exif.cc
index 14d194865ce931ec17b78c241f22af855791dfac..4982f598948e2cfd2d81a89b4a8f4c2a07192afc 100644 (file)
--- a/exif.cc
+++ b/exif.cc
@@ -851,7 +851,7 @@ ExifFormat::exif_waypt_from_exif_app(ExifApp* app) const
     if (idatum < 0) {
       fatal(MYNAME ": Unknown GPSMapDatum \"%s\"!\n", datum.constData());
     }
-    if (idatum != kDautmWGS84) {
+    if (idatum != kDatumWGS84) {
       GPS_Math_WGS84_To_Known_Datum_M(wpt->latitude, wpt->longitude, 0.0,
                                       &wpt->latitude, &wpt->longitude, &alt, idatum);
     }
index db0db9a84604d6d202744195dba9f41fe1746392..bf429eae033db040fef712163b6f392a49e3b98e 100644 (file)
@@ -119,7 +119,7 @@ GarminTxtFormat::convert_datum(const Waypoint* wpt, double* dest_lat, double* de
 {
   double alt;
 
-  if (datum_index == kDautmWGS84) {
+  if (datum_index == kDatumWGS84) {
     *dest_lat = wpt->latitude;
     *dest_lon = wpt->longitude;
   } else GPS_Math_WGS84_To_Known_Datum_M(wpt->latitude, wpt->longitude, 0.0,
@@ -697,7 +697,7 @@ GarminTxtFormat::wr_init(const QString& fname)
     datum_index = kDatumOSGB36;
     break;
   case grid_swiss: /* force datum to WGS84 */
-    datum_index = kDautmWGS84;
+    datum_index = kDatumWGS84;
     break;
   default:
     datum_index = gt_lookup_datum_index(datum_str, MYNAME);
diff --git a/main.cc b/main.cc
index 690950b4a0107a25ea9c019ba6e00c192845c858..7667c1af9e46576deb85912716f41d3ff64b6f42 100644 (file)
--- a/main.cc
+++ b/main.cc
@@ -804,7 +804,7 @@ main(int argc, char* argv[])
   }
 
   assert(GPS_Lookup_Datum_Index("OSGB36") == kDatumOSGB36);
-  assert(GPS_Lookup_Datum_Index("WGS 84") == kDautmWGS84);
+  assert(GPS_Lookup_Datum_Index("WGS 84") == kDatumWGS84);
 
   Vecs::Instance().init_vecs();
   FilterVecs::Instance().init_filter_vecs();
diff --git a/nmea.cc b/nmea.cc
index e4087aa21365372b0865bf5982989dcd6b16f5ca..2a2c90d0db0a35c134bf1db7acfd82183d72bdba 100644 (file)
--- a/nmea.cc
+++ b/nmea.cc
@@ -191,7 +191,7 @@ NmeaFormat::nmea_add_wpt(Waypoint* wpt, route_head* trk) const
   // This also indicates to nmea_release_wpt that ownership has been
   // transferred to either the global_waypoint_list or global_track_list.
   wpt->extra_data = nullptr;
-  if (datum != kDautmWGS84) {
+  if (datum != kDatumWGS84) {
     double lat;
     double lon;
     double alt;
@@ -223,7 +223,7 @@ NmeaFormat::rd_init(const QString& fname)
 {
   curr_waypt = nullptr;
   last_waypt = nullptr;
-  datum = kDautmWGS84;
+  datum = kDatumWGS84;
   had_checksum = false;
 
   CHECK_BOOL(opt_gprmc);
diff --git a/ozi.cc b/ozi.cc
index 8b981c4da257c83f01e40b1eb1273f2979e69bf1..83d343b2b3d1d3e321fa1a7a0bac04f9690f929d 100644 (file)
--- a/ozi.cc
+++ b/ozi.cc
@@ -126,7 +126,7 @@ OziFormat::ozi_set_time_str(const QString& str, Waypoint* waypointp)
 void
 OziFormat::ozi_convert_datum(Waypoint* wpt) const
 {
-  if (datum != kDautmWGS84) {
+  if (datum != kDatumWGS84) {
     double lat;
     double lon;
     double alt;
index c1cb6b2eafbfa8ea8aa34f93e9ddbc57220a4bde..bd03cb42e9605d7f7e0b5bc965d47e447844676f 100644 (file)
--- a/parse.cc
+++ b/parse.cc
@@ -214,7 +214,7 @@ parse_coordinates(const char* str, int datum, const grid_type grid,
     break;
 
   case grid_bng:
-    datum = kDautmWGS84;       /* fix */
+    datum = kDatumWGS84;       /* fix */
     format = "%2s %lf %lf%n";
     ct = sscanf(str, format,
                 map, &lx, &ly,
@@ -246,7 +246,7 @@ parse_coordinates(const char* str, int datum, const grid_type grid,
     double east;
     double north;
 
-    datum = kDautmWGS84;       /* fix */
+    datum = kDatumWGS84;       /* fix */
     format = "%lf %lf%n";
     ct = sscanf(str, format,
                 &east, &north, &result);
@@ -273,7 +273,7 @@ parse_coordinates(const char* str, int datum, const grid_type grid,
     lon = -lon;
   }
 
-  if (datum != kDautmWGS84) {
+  if (datum != kDatumWGS84) {
     double alt;
     GPS_Math_Known_Datum_To_WGS84_M(lat, lon, 0.0,
                                     &lat, &lon, &alt, datum);
index 642af626262703a4c20d42829098eb5c2aa3a1be..ab1534de99bb138b3ba2e56528531d6f32441360 100644 (file)
--- a/unicsv.cc
+++ b/unicsv.cc
@@ -606,7 +606,7 @@ UnicsvFormat::unicsv_parse_one_line(const QString& ibuf)
                         &wpt->latitude, &wpt->longitude, MYNAME);
       /* coordinates from parse_coordinates are in WGS84
          don't convert a second time */
-      src_datum = kDautmWGS84;
+      src_datum = kDatumWGS84;
       break;
 
     case fld_bng:
@@ -614,7 +614,7 @@ UnicsvFormat::unicsv_parse_one_line(const QString& ibuf)
                         &wpt->latitude, &wpt->longitude, MYNAME);
       /* coordinates from parse_coordinates are in WGS84
          don't convert a second time */
-      src_datum = kDautmWGS84;
+      src_datum = kDatumWGS84;
       break;
 
     case fld_bng_zone:
@@ -630,11 +630,11 @@ UnicsvFormat::unicsv_parse_one_line(const QString& ibuf)
       break;
 
     case fld_swiss:
-      parse_coordinates(value, kDautmWGS84, grid_swiss,
+      parse_coordinates(value, kDatumWGS84, grid_swiss,
                         &wpt->latitude, &wpt->longitude, MYNAME);
       /* coordinates from parse_coordinates are in WGS84
          don't convert a second time */
-      src_datum = kDautmWGS84;
+      src_datum = kDatumWGS84;
       break;
 
     case fld_swiss_easting:
@@ -1029,15 +1029,15 @@ UnicsvFormat::unicsv_parse_one_line(const QString& ibuf)
           fatal(MYNAME ": Unable to convert BNG coordinates (%s %.f %.f)!\n",
                 CSTR(bng_zone), bng_easting, bng_northing);
       }
-      src_datum = kDautmWGS84; /* don't convert afterwards */
+      src_datum = kDatumWGS84; /* don't convert afterwards */
     } else if ((swiss_easting != kUnicsvUnknown) && (swiss_northing != kUnicsvUnknown)) {
       GPS_Math_Swiss_EN_To_WGS84(swiss_easting, swiss_northing,
                                  &wpt->latitude, &wpt->longitude);
-      src_datum = kDautmWGS84; /* don't convert afterwards */
+      src_datum = kDatumWGS84; /* don't convert afterwards */
     }
   }
 
-  if ((src_datum != kDautmWGS84) &&
+  if ((src_datum != kDatumWGS84) &&
       (wpt->latitude != kUnicsvUnknown) && (wpt->longitude != kUnicsvUnknown)) {
     double alt;
     GPS_Math_Known_Datum_To_WGS84_M(wpt->latitude, wpt->longitude, 0.0,
@@ -1286,7 +1286,7 @@ UnicsvFormat::unicsv_waypt_disp_cb(const Waypoint* wpt)
   QString shortname = wpt->shortname;
   const garmin_fs_t* gmsd = garmin_fs_t::find(wpt);
 
-  if (unicsv_datum_idx == kDautmWGS84) {
+  if (unicsv_datum_idx == kDatumWGS84) {
     lat = wpt->latitude;
     lon = wpt->longitude;
     alt = wpt->altitude;
@@ -1684,7 +1684,7 @@ UnicsvFormat::wr_init(const QString& fname)
 
   unicsv_outp_flags.reset();
   unicsv_grid_idx = grid_unknown;
-  unicsv_datum_idx = kDautmWGS84;
+  unicsv_datum_idx = kDatumWGS84;
   unicsv_fieldsep = kUnicsvFieldSep;
   unicsv_waypt_ct = 0;
 
@@ -1709,7 +1709,7 @@ UnicsvFormat::wr_init(const QString& fname)
   } else if (unicsv_grid_idx == grid_swiss)
     /* ! ignore parameter "Datum" ! */
   {
-    unicsv_datum_idx = kDautmWGS84;  /* internal, becomes CH1903 */
+    unicsv_datum_idx = kDatumWGS84;  /* internal, becomes CH1903 */
   } else {
     unicsv_datum_idx = gt_lookup_datum_index(opt_datum, MYNAME);
   }
diff --git a/xcsv.cc b/xcsv.cc
index b655b108788e12121801e1ad0dac8a58781879e8..23266cd6a541dcccf1cd1d66bdd76927836953ce 100644 (file)
--- a/xcsv.cc
+++ b/xcsv.cc
@@ -907,7 +907,7 @@ XcsvFormat::read()
         wpt_tmp->longitude = -wpt_tmp->longitude;
       }
 
-      if ((xcsv_file->gps_datum_idx > -1) && (xcsv_file->gps_datum_idx != kDautmWGS84)) {
+      if ((xcsv_file->gps_datum_idx > -1) && (xcsv_file->gps_datum_idx != kDatumWGS84)) {
         double alt;
         GPS_Math_Known_Datum_To_WGS84_M(wpt_tmp->latitude, wpt_tmp->longitude, 0.0,
                                         &wpt_tmp->latitude, &wpt_tmp->longitude, &alt, xcsv_file->gps_datum_idx);
@@ -918,7 +918,7 @@ XcsvFormat::read()
                                        &wpt_tmp->longitude,
                                        parse_data.utm_easting, parse_data.utm_northing,
                                        parse_data.utm_zone, parse_data.utm_zonec,
-                                       kDautmWGS84);
+                                       kDatumWGS84);
       }
 
       if (parse_data.link_) {
@@ -1036,7 +1036,7 @@ XcsvFormat::xcsv_waypt_pr(const Waypoint* wpt)
     description = shortname;
   }
 
-  if ((xcsv_file->gps_datum_idx > -1) && (xcsv_file->gps_datum_idx != kDautmWGS84)) {
+  if ((xcsv_file->gps_datum_idx > -1) && (xcsv_file->gps_datum_idx != kDatumWGS84)) {
     double alt;
     GPS_Math_WGS84_To_Known_Datum_M(latitude, longitude, 0.0,
                                     &latitude, &longitude, &alt, xcsv_file->gps_datum_idx);